﻿@model Apps.Models.Flow_FormContent
@using Apps.Web.Core;
@using Apps.Locale;
@using Apps.Models.Sys;
@using Apps.Models.Enum;
@{
    ViewBag.Title = "创建";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
}

<form id="flowform">
    @Html.HiddenFor(model => model.Id)
    @Html.HiddenFor(model => model.FormId)
    @Html.HiddenFor(model => model.UserId)
    <input id="CreateTime" type="hidden" name="CreateTime" value="2000-1-1" />
    <input id="TimeOut" type="hidden" name="TimeOut" value="2111-1-1" />
    <input id="Title" type="hidden" name="Title" value="User Post" />
    <table class="mvctool ">
        <tr> 
            <td>
                <div class="mvctool bgb">
                    @Html.ToolButton("btnSave", "fa fa-save", Resource.Save, ref perm, "Create", true)
                    @Html.ToolButton("btnSubmit", "fa fa-sign-in", Resource.Submit, ref perm, "Check", true)
                    @Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply, false)
                </div>
            </td> 
            <th style='width:100px; text-align:right;'>紧急程度</th>
            <td>
                <select name="FormLevel" id="FormLevel">
                    <option value="@((int)FlowFormLevelEnum.Ordinary)">普通</option>
                    <option value="@((int)FlowFormLevelEnum.Major)">重要</option>
                    <option value="@((int)FlowFormLevelEnum.Urgent)">紧急</option>
                </select>
            </td>
            @if (ViewBag.Checker == null)
            {
                <th style='width:100px; text-align:right;'>
                    审批人
                </th>
                <td>
                    @Html.HiddenFor(model => model.CustomMember)
                    <input id="CustomMemberList" name="CustomMemberList" readonly="readonly" type="text" style="width: 90px; display: inline; background: #dedede; ">
                    <a class="fa fa-plus-square color-gray fa-lg" id="selExc" href="javascript:void(0)"></a>
                    <script type="text/javascript">
                            $(function () {
                                $("#selExc").click(function () {
                                    $("#modalwindow").html("<iframe width='100%' height='100%' scrolling='no' frameborder='0'' src='/SysHelper/UserLookUp?key=CustomMember&val=CustomMemberList'></iframe>");
                                    $("#modalwindow").window({ title: '选择人员', width: 620, height: 388, iconCls: 'fa fa-plus' }).window('open');
                                });
                            });

                            function SetSelResult(result, resultName,key,val) {
                                $("#"+key).val(result);
                                $("#"+val).val(resultName);
                            }
                            function GetSelResult(key,val) {
                                var arrayObj = new Array()
                                arrayObj[0] = $("#"+key).val();
                                arrayObj[1] = $("#"+val).val();
                                return arrayObj;
                            }
                            //ifram 返回
                            function frameReturnByClose() {
                                $("#modalwindow").window('close');
                            }
                    </script>
                </td>
            }
        </tr>
    </table>
</form> 
